Skip to content

feat: multiple slot types#2927

Merged
grutt merged 133 commits intomainfrom
feat--multiple-slot-types
Feb 17, 2026
Merged

feat: multiple slot types#2927
grutt merged 133 commits intomainfrom
feat--multiple-slot-types

Conversation

@grutt
Copy link
Contributor

@grutt grutt commented Feb 3, 2026

Description

This change replaces the old durable slot model—which required two concurrent worker processes—with a scheduler‑driven approach. This change allows for multiple worker lot config rows per worker which represent different "slot pools". Initially these are "default" and "durable".

The feature is designed to extend to multiple units per task and multiple types of slots in the near future with no new schema changes.

Depends on #2913

Type of change

  • New feature (non-breaking change which adds functionality)

What's Changed

  • Add slot type + slot capacity support across scheduler, worker APIs, and UI.
  • Add DB schema updates and migrations for slot types/defaults.
  • Update Go/Python/TS SDKs and examples.
  • Update worker docs and SDK docs to reflect slot configuration changes.

@vercel
Copy link

vercel bot commented Feb 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hatchet-docs Ready Ready Preview, Comment Feb 17, 2026 1:04pm

Request Review

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the dual-worker model (separate non-durable and durable workers) with a scheduler-driven approach using multiple slot types. The scheduler now owns slot assignment and capacity tracking while workers report capabilities and consume assignments.

Changes:

  • Replaced dual-worker architecture with single worker supporting multiple slot types ("default" and "durable")
  • Added DB tables for slot configuration (v1_worker_slot_config, v1_step_slot_request, v1_task_runtime_slot)
  • Updated SDKs (Go, Python, TypeScript) to support slot_config and removed separate worker instances for durable tasks
  • Modified UI to display slot capacity by type instead of simple available/max counts

Reviewed changes

Copilot reviewed 102 out of 104 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
sql/schema/v1-core.sql Added new slot-related tables and enum types
sql/schema/v0.sql Removed maxRuns column from Worker table
sdks/typescript/src/v1/client/worker/worker.ts Unified worker from dual instances to single with slot config
sdks/typescript/src/v1/client/worker/slot-utils.ts New utility for resolving worker slot configurations
sdks/python/hatchet_sdk/worker/worker.py Unified worker architecture, removed dual action registries
sdks/go/client.go Merged dual worker into single with slot config support
pkg/scheduling/v1/scheduler.go Updated slot assignment to support multiple slot types per worker
pkg/repository/worker.go Added queries for worker slot configs and availability by type
cmd/hatchet-migrate/migrate/migrations/20260203130000_v1_0_75.sql Migration script to transition existing data to new schema
frontend/app/src/pages/main/v1/workers/components/worker-columns.tsx Updated UI to display slots by type
api-contracts/dispatcher/dispatcher.proto Added slot_config and durable_slots fields

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@grutt grutt merged commit 2fdc47a into main Feb 17, 2026
79 checks passed
@grutt grutt deleted the feat--multiple-slot-types branch February 17, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants